<?php 
namespace app\admin\service;


use app\admin\model\Banner;

/**
 * 广告管理-服务类
 * @author 小树林
 * @since: 2023/12/23
 * Class BannerService
 * @package app\admin\service
 */
class BannerService extends BaseService
{
    /**
     * 构造函数
     * LevelService constructor.
     */
    public function __construct()
    {
        $this->model = new Banner();
    }
	
	/**
     * 获取数据列表
     * @return array
     * @since 2023/12/23
     * @author 小树林
     */
    public function getList()
    {
        $param = request()->param();

        //是否为远程搜索查询
        $is_query = $param['_is_query'] ?? '';
        if(!empty($is_query)){
            return parent::query($param);
        }

        // 查询条件
        $map = [];
		
	
	    // 状态
        $status = isset($param['status']) ? (int)$param['status'] : 0;
        if ($status) {
            $map[] = ['status', '=', $status];
        }
		
	    // 有效标识
        $mark = isset($param['mark']) ? (int)$param['mark'] : 0;
        if ($mark) {
            $map[] = ['mark', '=', $mark];
        }
		
	    // 展示位置
        $type = isset($param['type']) ? (int)$param['type'] : 0;
        if ($type) {
            $map[] = ['type', '=', $type];
        }
	
        $field = '*';
        $with = [];
        $sort = '';

        return parent::getList($map,$field,$with,$sort); // TODO: Change the autogenerated stub
    }


                		                            
}